package com.itheima02;

import java.util.Objects;

/**
 * @author Xiao
 * @date 2021/7/20
 */
public class ObjectsDemo {
    public static void main(String[] args) {
        Student stu = new Student("阿良",24);
        Student stu1 = null;

        boolean b1 = Objects.isNull(stu);   //false
        boolean b2 = Objects.isNull(stu1);  //true
        boolean b3 = Objects.nonNull(stu);  //true
        boolean b4 = Objects.nonNull(stu1); //false
        System.out.println(b1 + "\t" + b2 + "\t" + b3 + "\t" + b4);
    }
}
